package config;

import bean.Student;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource("config.properties")
public class StudentConfig {


    @Value("${student102.id}")
    private int id;
    @Value("${student102.name}")
    private String name;



    @Bean("student102")
    public Student student(){
        return new Student(id, name);
    }
}
